﻿using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Payroll.Biz.Legacy.Test.Utils
{
    internal static class AssertUtils
    {
        public static void IsTrue(bool actual)
        {
            Assert.That(actual, Is.True);
        }

        public static void IsFalse(bool actual)
        {
            Assert.That(actual, Is.False);
        }

        public static void IsNull(object actual)
        {
            Assert.That(actual, Is.Null);
        }

        public static void IsNotNull(object actual)
        {
            Assert.That(actual, Is.Not.Null);
        }

        public static void Equals<T>(T expected, T actual)
        {
            Assert.That(actual, Is.EqualTo(expected));
        }

        public static void NotEquals<T>(T expected, T actual)
        {
            Assert.That(actual, Is.Not.EqualTo(expected));
        }

        public static void Throws<T>(Action action) where T : Exception
        {
            Assert.Throws<T>(() => action());
        }

        public static void DoesNotThrow(Action action)
        {
            Assert.DoesNotThrow(() => action());
        }
    }
}
